package net.jjjshop.common.entity.lbt;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 挂卖回收金币订单表 Entity 实体类
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("jyb_business_order")
@ApiModel(value="JybBusinessOrderEntity对象", description="挂卖回收金币订单表")
public class JybBusinessOrderEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 *
	 */
	@ApiModelProperty(value = "记录ID")
	@TableId(value = "id", type = IdType.AUTO)
	private Integer id;

	/**
	 * 用户ID
	 */
	@ApiModelProperty(value = "用户ID")
	private Integer uid;
	/**
	 * 时间
	 */
	@ApiModelProperty(value = "时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	private Date createTime;
			/**
			 * 1:挂卖，2，回收
			 */
			@ApiModelProperty(value = "1:挂卖，2，回收")
			@NotNull(message = "交易类型不能为空")
			private Integer type;


			@ApiModelProperty(value = "支付方式ID")
//			@NotNull(message = "支付方法不能为空")
			private Integer payId;

			/**
			 * 数量
			 */

			@ApiModelProperty(value = "数量")
			@NotNull(message = "数量不能为空")

			@DecimalMin(value = "5", message = "数量不能小于5")
			private BigDecimal num;
			/**
			 * 单价
			 */

			@ApiModelProperty(value = "单价")
			@DecimalMin(value = "0.01", message = "单价要大于0")
			private BigDecimal price;
			/**
			 * 支付方式：1:支付宝、2微信，3银行卡
			 */

			@ApiModelProperty(value = "支付方式：1:支付宝、2微信，3银行卡")
			@NotNull(message = "支付方式不能为空")
			private Integer payType;

			@ApiModelProperty(value = "分类：0:权益卡、1佣金")
			@NotNull(message = "分类不能为空")
			private Integer classType;
			/**
			 * 备注
			 */
			@ApiModelProperty(value = "备注")
			private String remarks;
	/**
	 * 商户应用
	 */
	@ApiModelProperty(value = "商户应用")
	private Integer appId;

	/**
	 * 状态：0交易中，1，已完成，2撤销
	 */
	@ApiModelProperty(value = "状态：0交易中，1，已完成，2撤销")
	private Integer status;

	@TableField(exist = false)
	private String nickname;
	@TableField(exist = false)
	private String account;
	@TableField(exist = false)
	private String avatar;
	@TableField(exist = false)
	private String phone;
	@TableField(exist = false)
	private String realName;
	
}
